import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import dayjs from 'dayjs'
import relativeTime from 'dayjs/plugin/relativeTime'
import 'dayjs/locale/zh-cn'
dayjs.locale('zh-cn')
dayjs.extend(relativeTime)

// 全局过滤器
Vue.filter('relaTime', val => {
  return dayjs(val).fromNow()
})

Vue.config.productionTip = false

// 导入全局样式
import './styles/base.less'
// 导入vant路径
import './utils/vant'
// 导入flexible文件
import 'amfe-flexible'

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
